Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Classes #27

Merged
merged 10 commits into from
Apr 28, 2024
Merged

Use Classes #27

merged 10 commits into from
Apr 28, 2024

Conversation

abdel-17
Copy link
Contributor

This is another experiment comparing #26, which uses objects with getters, to a class-based approach.

Advantages to classes:
1- better performance
2- classes are their own type, so you don't need to define a separate FloatingContext and UseFloatingReturn type. The JSDoc lives next to the implementation, which is nicer imo.

Disadvantages:
1- some boilerplate is involved with this and all that, but I don't think it's that much more.

Copy link

vercel bot commented Apr 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
floating-ui-svelte ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 28, 2024 9:48am

@Hugos68 Hugos68 merged commit 5c456da into skeletonlabs:dev Apr 28, 2024
7 checks passed
@Hugos68 Hugos68 mentioned this pull request Apr 28, 2024
@abdel-17 abdel-17 deleted the use-classes branch April 28, 2024 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants